<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8" />
		<title>Document</title>
		<meta name="viewport" content=" width=device-width initial-scale=1.0 maximum-scale=1 minimum-scale=1 user-scalable=no viewport-fit=cover">
		<style>
			*{
				margin: 0;
				padding: 0;
			}
			#demo{
				width: 100%;
				height: 300px;
				background-color: skyblue;
				font-size: 40px;
			}
		</style>
	</head>
	<body>
		<div id="demo"></div>
		<script type="text/javascript" >
			const demo = document.getElementById('demo')
			demo.ontouchstart = (event)=>{
				console.log('你的手指触摸了蓝色的盒子',event.touches[0].radiusX)
				// console.log('触控点数',event.touches.length)
				document.getElementById('demo').innerHTML = '半径：'+event.touches[0].radiusX + '<br/>'
				document.getElementById('demo').innerHTML += '触控点数：'+event.touches.length
			}
			demo.ontouchmove = ()=>{
				console.log('你的手指在蓝色的盒子上移动了')
			}
			demo.ontouchend = ()=>{
				console.log('你的手指从蓝色的盒子上抬起来了')
			}
			demo.ontouchcancel = ()=>{
				console.log('你的触摸被打断了')
			}
			/* setTimeout(()=>{
				alert(1)
			},2000) */
		</script>
	</body>
</html>